home *** CD-ROM | disk | FTP | other *** search
/ Delphi Developer's Kit 1996 / Delphi Developer's Kit 1996.iso / power / acc_obj0 / readme.txt < prev    next >
Encoding:
Text File  |  1995-12-22  |  3.0 KB  |  63 lines

  1.  
  2. EXAMPLES OF CREATING FILE ACCESS OBJECTS AND SOME DEMO PROGRAMS
  3.  
  4. Object oriented programming allows wonderful mechanisms for reading
  5. and writing special file structures (and practically all file
  6. structures are special).
  7.  
  8. I call these OOP things for "access objects".  They allow the
  9. specialness of manipulating the data into a file to be encapsolated
  10. and tucked away so that the application program only has to deal
  11. with the data itself and note the file structure.
  12.  
  13. I have written them for TXT, OBJ, WKS, WK1, WQ1, dBase2, dBase3, DXF
  14. (AutoCADD) files.  And I write them for practically every special
  15. file that I design.  For example writing comma-quote-delimited files
  16. (for import into spreadsheets), partitioned sequential files for
  17. storing and retrieving massive amounts of acoustical emission data,
  18. tStream object files (for filing persistent objects), version
  19. controlled flat files (which allow graceful and fairly painless
  20. changes in the record format), etc.
  21.  
  22. To illustrate some techniques for making these access objects, I have
  23. put this little package of examples together.  These routines are
  24. not guaranteed, so check them and understand them before using them
  25. on a real project.  While they are meant to be compiled under Delphi,
  26. most of the techniques are from TP and BP.
  27.  
  28. First example:
  29. U_EGA_0a.pas defines, with a lot of comments, a buffered access reader
  30.     for reading DXF (AutoCADD) text files.  It first defines an
  31.     abstract reader object class, tBasicDFXReaderCls, that has the
  32.     functions that a typical application would need.  Then a simplest
  33.     possible (albeit slow) reader, tSimpleDFXReaderCls, is designed,
  34.     just for use in testing. Finally, a more practical reader object
  35.     class, tBlkIoDFXReaderCls, which uses disk buffering is created.
  36. T_EGA_0a.dpr is the project program for testing both of the working
  37.     readers in U_EGA_0a.
  38. TEST.DXF is a small input (AutoCADD DXF) text file for the testing.
  39.  
  40. Second example:
  41. U_EGB_0a.pas defines an odd kind of general buffering reader object.
  42.     It returns to the application just a pointer to the data in
  43.     the access object's buffer.  We might call this a "scanner" rather
  44.     a reader.  There are a couple of descendants of the basic scanner.
  45.     Two for reading text files and one for reading files using the
  46.     record format of Lotus 1-2-3.
  47. T_EGB_0a.dpr is the project program for testing the text file
  48.     scanners and readers of U_EGB_0a.
  49.  
  50. Third example:
  51. T_EGW_0a.pas tests a scanner also defined in U_EGB_0a for Lotus
  52.     1-2-3 file record formats.
  53. TEST.WK1 is a Lotus 1-2-3 format file for testing.
  54.  
  55. I realize that these things are pretty quick and dirty.  I meant for
  56. them to illustrate techniques rather than be for production use.
  57. If you have any good ideas or comments (such as for making components
  58. or handling exceptions) please send them to me and I will add them
  59. to this package (with credits, of course).
  60.  
  61. John F Herbster, CIS: 72714,3445, (Herbster Scientific)
  62. 12807 Park Royal, Houston, TX, 713-558-2708, July 20, 1995.
  63.